package unimelb.distSystems.project2;

/*
 * Lim Ching Lih, 308721
 * Yu Xia, 351025
 * Carlos Vasconcelos, 193554
 */

/*
 * Helper class for GUI list component
 * Reason: Easy way to store ID for an object being listed. 
 * List component does not provide easy way to store ID
 */
public class ListItem {
	private long id;
	private String public_text;
	
	/*
	 * Constructor
	 */
	public ListItem(long id,String public_text)
	{
		this.id=id;
		this.public_text=public_text;
	}
	
	/*
	 * Output: GUI text of list item in the list component
	 * @see java.lang.Object#toString()
	 */
	public String toString()
	{
		return public_text;
	}
	
	/*
	 * Convenient way to get ID of an object
	 * Input: Nothing
	 * Output: long value of unqiue ID
	 */
	public long getID()
	{
		return id;
	}
}
